this._tracker = Shell.WindowTracker.get_default();
this._windowDemandsAttentionId = global.display.connect('window-demands-attention',
this._onWindowDemandsAttention.bind(this));
+ this._windowMarkedUrgentId = global.display.connect('window-marked-urgent',
+ this._onWindowDemandsAttention.bind(this));
},
_getTitleAndBanner(app, window) {
this.signalIDs = [];
this.signalIDs.push(this._window.connect('notify::demands-attention',
- () => { this.destroy(); }));
+ this._sync.bind(this));
+ this.signalIDs.push(this._window.connect('notify::urgent',
+ this._sync.bind(this));
this.signalIDs.push(this._window.connect('focus',
() => { this.destroy(); }));
this.signalIDs.push(this._window.connect('unmanaged',
this.connect('destroy', this._onDestroy.bind(this));
},
+ _sync() {
+ if (this._window.demands_attention || this._window.urgent)
+ return;
+ this.destroy();
+ },
+
_onDestroy() {
for(let i = 0; i < this.signalIDs.length; i++) {
this._window.disconnect(this.signalIDs[i]);